/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoo.gamecenter.sdk.login.plugin.component;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ImageView.ScaleType;
import com.qihoo.gamecenter.sdk.login.plugin.f.a;

public class ImageCheckBox extends ImageView {
    private boolean a = false;
    private a b;
    private View.OnClickListener c = null;
    private View.OnClickListener d = new View.OnClickListener() {
        public void onClick(View paramView) {
            ImageCheckBox.this.setChecked(!(ImageCheckBox.a(ImageCheckBox.this)));
            if (ImageCheckBox.b(ImageCheckBox.this) == null)
                return;
            ImageCheckBox.b(ImageCheckBox.this).onClick(paramView);
        }
    };

    public ImageCheckBox(Context paramContext) {
        super(paramContext);
        b();
    }

    public void setChecked(boolean paramBoolean) {
        this.a = paramBoolean;
        if (this.a)
            this.b.a(this, 1073741829, 0, 0);
        else
            this.b.a(this, 1073741828, 0, 0);
    }

    public boolean a() {
        return this.a;
    }

    public void setOnClickListener(View.OnClickListener paramOnClickListener) {
        this.c = paramOnClickListener;
    }

    private void b() {
        this.b = a.a(getContext());
        super.setOnClickListener(this.d);
        setScaleType(ImageView.ScaleType.FIT_XY);
    }
}